<template>
  <!-- 静态/动态类名 -->
  <a :href="href" :target="target" :class="['my-link', type]">
    <slot></slot>
  </a>
</template>

<script>
export default {
  name: "MyLink",
  props: {
    href: String,
    type: String,
    target: String,
  },
};
</script>

<style lang="scss" scoped>
.my-link {
  color: #222;
  font-size: 14px;
  text-decoration: none;

  &.primary {
    color: lightskyblue;
  }

  &.success {
    color: lightgreen;
  }

  &.warning {
    color: lightseagreen;
  }

  &.danger {
    color: lightcoral;
  }
}
</style>